package com.zhuangxiaoyan.designpattern.adaptermodel.adapter.impl;

import com.zhuangxiaoyan.designpattern.adaptermodel.adapter.HandlerAdapter;
import com.zhuangxiaoyan.designpattern.adaptermodel.controller.impl.AnnotationtController;

/**
 * @Classname HttpRequestHandlerAdapter
 * @Description  注解类型的适配器
 * @Date 2022/5/8 14:26
 * @Created by xjl
 */
public class AnnotationtHandlerAdapter implements HandlerAdapter {
    @Override
    public boolean supports(Object handler) {
        return (handler instanceof AnnotationtController);
    }

    @Override
    public void handler(Object handler) {
        ((AnnotationtController)handler).handler();
    }
}
